Introduction

Chapter 6 describes additions and clarifications to the ABI library specifications. Facilities in these libraries manipulate system data files, trap to the operating system, and so on. The routines described here are corrections or omissions from the base documents, or additions specific to the MIPS ABI environment. The following areas are defined:

libc       The C library, containing various facilities defined by
           System V, ANSI C, POSIX, and so on.  It contains interfaces
           to basic system services.

           Some special cases are covered in detail:

           mmap      Reserved range for MMAP_FIXED
           sysinfo   MIPS ABI specific additions
           mtio      Tape Manipulation ioctl Calls

libdl      The dynamic linking library, containing routines that give the
	   user direct access to the dynamic linking facilities.

libnsl     The networking services library, containing the transport layer 
	   interface routines, as well as routines for machine independent
	   data representation (XDR), remote procedure calls (RPC) and
	   other networking support.

libmutex   Routines allowing programs to access fast mutual
	   exclusion features.

libsocket  Routines providing an interface to Berkeley Software
	   Distribution (BSD) networking facilities based on the socket
	   model.

libabi     A library containing assorted routines which are additions to
	   the base ABI documents.  For the current release of this
           specification, if contains only the Asynchronous I/O Interfaces
           from POSIX 1003.1b.

libX       A library for building applications using the X Window System,
           Version 11 protocol.

While not all ABI-conforming systems provide a complete ABI development environment, all are required to have the ability to link ABI-conforming objects together with locally produced objects to produce a localized binary. The actual environment to link ABI objects into a localized binary may be an optional package. Certain additional interfaces are provided for the use of ABI conforming programs in the form of of static archives which are required to be present if the the ability to link ABI objects is installed on a platform.

libm      Math Library

libXm     OSF/Motif Library

libgen    General-Purpose Library

libucb    BSD Emulation Library

Shared Library Names

Executable and shared object files contain the names of required shared libraries. The following shared libraries are required by the MIPS ABI.

Figure 1. Shared Library Names


System Library

The System Library, libsys, as described in the generic ABI Chapter 6, has been removed from the MIPS ABI. Originally, libsys will not necessarily exist as a separate library on ABI conforming systems. Thus, /usr/lib/ld.so.1 is not required. As described in the generic ABI, all libsys symbols are present in libc.

C Library

The C library, libc, contains all the symbols listed in the generic ABI and MIPS processor specific ABI, as well as the symbols described in the following sections.

Additional Entry Points

The following routines are included in the libc library to provide entry points for the required source- level interfaces listed in the generic ABI. A description and syntax summary for each function follows the table.

Figure 2. Additional Required Entry Points



Support Routines

Figure 3. libc Contents, Names without Synonyms



Figure 4. libc Contents, Names with Synonyms



*Function is new to version 1.2

Note that the following routines are listed in the generic ABI as Names without Synonyms.

Figure 5. libc Contents, Names with Synonyms,
previously listed without Synonyms



void *sbrk(int incr)

int setegid (gid_t group)

int seteuid (uid_t user)

long sysinfo (int command, char *buf, long count)

mmap Routine

A group of programs may need to specify the address of shared memory and mapped file regions in order to use the same addresses to access these regions. The address range from 0x30000000 to 0x3fff0000 is reserved for this purpose; additional contiguous space above this range is recommended and may be supported. A MIPS ABI conforming system guarantees that shared memory and mapped file regions placed by the system will not fall in this range.

The placement of a shared memory or mapped file region by a program must follow these rules:

For example, if a program wants to create a 0x3000-byte shared memory region and map a file with an offset of 0x2000 and length of 0x1000, both regions will have fixed addresses. One possible placement of these regions puts the shared memory region at [0x300000000, 0x30002fff] and [0x30042000, 0x30042fff].

  • Implementors using are advised that the generic ABI requires

    sysinfo Routine

    The following are additions to commands supported by sysinfo. The new and recommended routines are described below, along with examples. A sysinfo header file, including the additional commands, follows. See vendor release notes for vendor values.

    Tape Manipulation ioctl Calls

    The entire mtio section is new as of Version 1.2 of the Conformance Guide, but will not be marked with diffmarks. A standard set of binary compatible calls for the postitioning and movement of tape devices is part of the ABI with Version 1.2 of this document. As with other aspects of the ABI, the intent of these definitions is to allow a machine independent mechanism of tape positioning and manipulation.

    As these specifications were discussed, some fundamental inconsistencies were discovered among the existing implementations of the tape manipulation ioctl's. Because each vendor must retain binary compatibility for their own software, new values have been established for these interfaces, rather than reusing existing values.

    The header file <sys/mtio.h> (described in the Systems V Interface Definition, Third Edition, but not formally part of the generic ABI) shall include the following additional definitions.

    Figure 7. Additions to Header File: <sys/mtio.h>


    ABI_MTIOCTOP is equivalent to the hex value 0x7409.

    The value of the element on return is specific to different tape devices and some implementations may not modify this element.

    The fields reserved1, reserved2 and reserved3 are included for compatibility.

    Tape Positioning

    The position of the tape read/write head must be consistent across platforms for applications using tape ioctl calls. The physical data on tapes varies between different device types and between driver implementations, but there is a consistent interpretation of the logical sequence of information on a tape as seen with the read function. Assume the following logical information on a tape, with the beginning of tape to the left and the end of the tape to the right and positions labeled 0 through 5.

    Figure 8. Example Tape Layout

          (data1)   (data2)   (FM1)   (data3)   (FM2)   (EOD)
          ^         ^         ^       ^         ^       ^
          |0        |1        |2      |3        |4      |5
    

    Each labelled position is to the beginning-of-tape side of the data blocks and file marks. Attempts to read the end- of-data (EOD) information will receive either an error indication or zero bytes read, depending upon the implementation.

    Sequential single-block read calls from the beginning of the tape in this example will return (data1), (data2), end-of-file (indicated by a return value of zero), (data 3), end-of-file and end-of-data. The data blocks in this example are all the same size. Detection of end-of-data on the tape is indicated by a with a return value of zero, followed by a read which returns zero or an error indication with errno set to ENOSPC.

    Each position is such that if a read is performed, the block beginning at that position will be read, i.e. if the tape is at position 1, a read will return the contents of block "data2". The following table summarizes the final position of the tape head when various commands are performed with the tape head at a given starting position, a value of mt_cnt of one and with successful (no error) completion of the ioctl call:

    Figure 9. Tape Positioning after ioctl Operations


  • Tape manipulation has proven to be an extremely subtle issue. The discussions of the exact semantics of the various operations have highlighted the fact that many different interpretations of the basic semantics are possible. Operating system implementors should pay careful attention to the semantics expressed in the above table, as they define the ABI behavior. It is believed that these semantics are compatible with most of the existing implementations. The read indicated above is for the size of one data block. The EOF indication for read is a return value of zero.

    Items in the table indicated by a hyphen result in a tape position which is not defined by the ABI. It is implementation-dependent whether an error condition is reported by the ioctl call.

    Positioning on Close

    The tape position after closing on devices opened with rewind access is the beginning of the tape. The position after closing on devices opened with no-rewind access is generally undefined. However, if a file mark has just been read the tape will remain at the current position when closed.

    If the last operation was to write data, a file mark followed by an end-of-data indication will be written. The applies whether the device was opened with rewind access or no-rewind access. The tape position after closing on devices opened with no-rewind access will be after the file mark.

    Figure 10. Tape Positioning after close for device opened
    with no-rewind access

       Last Operation                      Action After close
       --------------------------------------------------------------------------
       write                               Write EOF and EOD, position before EOD
       read which returned EOD indication  Position after EOF
       ioctl(ABI_MTWEOF)                   Position after EOF
       ioctl(ABI_MTFSF)                    Leaves positioned after EOF
       All others                          Undefined
    

    Effects of write

    Data written with a write function will be written starting at the first data block or file mark following the current tape position. The effect on data following the written data is undefined and may not be retrievable by subsequent tape positioning and read functions.

    If the tape has just been positioned to the point after a file mark, writing to the tape will start a new tape file even if the file mark is the last one prior to the end-of- data. This allows new tape files to be added to the end of the previous data.

    Return Values

    The function returns -1 when errors occur and sets the global variable errno to error codes defined in < errno.h>. The values returned in the mt_sys element of the abi_mdata structure are device-specific and should only be used for display purposes.

    Reading an end-of-file causes a return value of zero from the read call. If the file mark read is the last one on the tape, a subsequent read will return either zero or an error indication with errno set to ENOSPC

    Partitioned Tapes

    Some magnetic media are logically partitioned into multiple logical tapes. When the commands specified herein are used on such a medium they apply to the logical tape rather than the physical tape. For example, rewind media command for a partitioned 4mm DDS tape will position the write head before the first block of the current partition, which may be different than the first block of the physical medium. The specification of commands which affect media partitioning is outside the scope of the ABI.

    Runtime Dynamic Linking Library

    The libdl library allows users to dynamically link shared libraries after a program is launched. The library contains the following entry points.

    Figure 11. libdl Contents

    dlopen         dlclose        dlsym          dlerror
    

    Shared libraries are accessed with dlopen and released with dlclose . Symbols in shared libraries opened via dlopen can be located by calling dlsym . libdl is implemented as a shared library, linked on the command line using

    void *dlopen(char *pathname, int mode); This routine makes a shared object available to a running process. It returns a handle for future and calls. int dlclose(void *handle); Disassociates a shared object previously opened by from the current process. void *dlsym(void *handle, char *name); Allows a process to obtain the address of a symbol defined within a shared object previously opened by char *dlerror(void); Returns a formatted character string describing the last error that occurred during dynamic linking processing.

    Networking Services Library

    The Networking Services library, libnsl , contains all the symbols listed in the generic ABI and MIPS processor specific ABI, as well as the following symbols, which were omitted from the base documents or were not fully defined.

    Additional Entry Points

    The following routines are included in libnsl to correct oversights in the base documents.

    Figure 12. libnsl Contents,
    Additional Required Entry Points

    nc_sperror*          netdir_perror*      netdir_sperror* xdr_u_int*
    xdrrec_endofrecord*  xdrrec_skiprecord*
    

    *Function is new to version 1.2

    Figure 13. libnsl Contents, Global External Data Symbols


    Mutual Exclusion Library

    The Mutual Exclusion Library, libmutex , provides ABI entry points for mutual exclusion.

    Figure 14. libmutex Contents

    *Function is new to version 1.2

    These functions supply a user-level interface to mutual exclusion. The parameter lck must point to memory shared by all processes wishing to acquire or test the lock. The library routines might not contain checks for the validity (e.g. non-null value) of the lck parameter. If only a single process will be using the lock, lck need not reside in shared memory. libmutex is provided as a shared library, linked on the command line using -lmutex. The header file <abi_mutex.h> should be included.

    The contents of the structure abilock_t are defined in <abi_mutex.h> as follows:

    Figure 15. Header File: <abi_mutex.h>

    int init_lock(abilock_t *lck);
    int acquire_lock(abilock_t *lck);
    int release_lock(abilock_t *lck);
    void spin_lock(abilock_t *lck);
    int stat_lock(abilock_t *lck);
    
    typedef struct {
        unsigned long    abi_lock; 
        } abilock_t;
    

    Socket Library

    This definition is derived from the SVR4 specification of sockets, which depends on the Networking Services Library (libnsl) for services. However, applications that rely on assumptions about the underlying implementation of sockets may not be ABI compliant. In particular, stream operations on sockets are not supported. Constants labeled "may not be supported" are included for consistency between vendors but may not be implemented on all ABI compliant platforms. However, the constants are required to be included in the header files. The socket library is supplied as a shared library, libsocket.so . The socket library (-lsocket) must precede the networking services library (-lnsl) in the cc command line.

    The behavior of a zero queue length (the second argument) to the libsocket routine listen is undefined.

    Figure 16. libsocket Contents

    accept         bind           connect
    endhostent     endnetent      endprotoent
    endservent     ether_aton     ether_hostton
    ether_line     ether_ntoa     ether_ntohost
    gethostbyaddr  gethostbyname  gethostent
    getnetbyaddr   getnetbyname   getnetent
    getpeername    getprotobyname getprotobynumber
    getprotoent    getservbyname  getservbyport
    getservent     getsockname    getsockopt
    htonl          htons          inet_addr
    inet_lnaof     inet_makeaddr  inet_netof
    inet_network   inet_ntoa      listen
    ntohl          ntohs          recv
    recvfrom       recvmsg        send
    sendmsg        sendto         sethostent
    setnetent      setprotoent    setservent
    setsockopt     shutdown       socket socketpair
    

    Data Definitions for Sockets

    The following system header files contain the data structures and manifest constants required for sockets.

    Figure 17. Header File: <net/if.h>

    #define IFF_UP           0x1 
    #define IFF_BROADCAST    0x2
    #define IFF_DEBUG        0x4
    #define IFF_LOOPBACK     0x8
    #define IFF_POINTOPOINT  0x10
    #define IFF_NOTRAILERS   0x20
    #define IFF_RUNNING      0x40
    #define IFF_NOARP        0x80
    #define IFF_PROMISC      0x100
    #define IFF_ALLMULTI     0x200
    #define IFF_INTELLIGENT  0x400
    #define IFF_MULTICAST    0x800
    #define IFF_PRIVATE      0x8000
    
    struct   ifreq { 
    #define   IFNAMSIZ   16
             char   ifr_name[IFNAMSIZ];
             union {
                       struct  sockaddr ifru_addr;
                       struct  sockaddr ifru_dstaddr;
                       char    ifru_oname[IFNAMSIZ];
                       struct  sockaddr ifru_broadaddr;
                       short   ifru_flags;
                       int     ifru_metric;
                       char    ifru_data[1];
                       char    ifru_enaddr[6];
             } ifr_ifru;
    #define   ifr_addr      ifr_ifru.ifru_addr
    #define   ifr_dstaddr   ifr_ifru.ifru_dstaddr
    #define   ifr_oname     ifr_ifru.ifru_oname
    #define   ifr_broadaddr ifr_ifru.ifru_broadaddr
    #define   ifr_flags     ifr_ifru.ifru_flags
    #define   ifr_metric    ifr_ifru.ifru_metric
    #define   ifr_data      ifr_ifru.ifru_data
    #define   ifr_enaddr    ifr_ifru.ifru_enaddr 
    };
    
    struct   ifconf {
         int   ifc_len;
         union {
               caddr_t   ifcu_buf;
               struct    ifreq *ifcu_req;
         } ifc_ifcu;
    #define ifc_buf   ifc_ifcu.ifcu_buf
    #define ifc_req   ifc_ifcu.ifcu_req
    };
    

    Figure 18. Header File: <net/if_arp.h>

    struct arpreq {
    struct   sockaddr arp_pa;
    struct   sockaddr arp_ha;
    int      arp_flags;
    };
    
    #define   ATF_INUSE        0x01
    #define   ATF_COM 0x02
    #define   ATF_PERM         0x04
    #define   ATF_PUBL 0x08
    #define   ATF_USETRAILERS  0x10
    

    Figure 19. Header File: <netinet/if_ether.h>

    typedef u_char ether_addr_t[6];
    

    Figure 20. Header File: <netinet/in.h>

    #define ntohl(x) (x)
    #define ntohs(x) (x)
    #define htonl(x) (x)
    #define htons(x) (x)
    
    struct in_addr {
           u_long  s_addr;
    };
    
    #define INADDR_ANY (u_long)0x00000000
    
    struct sockaddr_in {
           short   sin_family;
           u_short sin_port;
           struct  in_addr sin_addr;
           char    sin_zero[8];
    };
    
    #define IPPROTO_IP      0
    #define IPPROTO_ICMP    1
    #define IPPROTO_IGMP    2
    #define IPPROTO_GGP     3
    #define IPPROTO_TCP     6
    #define IPPROTO_EGP     8
    #define IPPROTO_PUP    12
    #define IPPROTO_UDP    17
    #define IPPROTO_IDP    22
    #define IPPROTO_HELLO  63
    #define IPPROTO_ND     77
    
    #define IPPROTO_RAW   255
    #define IPPROTO_MAX   256
    
    #define IP_OPTIONS           1
    #define IP_MULTICAST_IF      2 /* may not be supported */
    #define IP_MULTICAST_TTL     3 /* may not be supported */
    #define IP_MULTICAST_LOOP    4 /* may not be supported */
    #define IP_ADD_MEMBERSHIP    5 /* may not be supported */
    #define IP_DROP_MEMBERSHIP   6 /* may not be supported */
    #define IP_HDRINCL           7 /* may not be supported */
    #define IP_TOS               8 /* may not be supported */
    #define IP_TTL               9 /* may not be supported */
    #define IP_RECVOPTS         10 /* may not be supported */
    #define IP_RECVRETOPTS      11 /* may not be supported */
    #define IP_RECVDSTADDR      12 /* may not be supported */
    #define IP_RETOPTS          13 /* may not be supported */
    

    Figure 21. Header File: <netinet/tcp.h>

    #define TCP_NODELAY     0x01
    #define TCP_MAXSEG      0x02
    

    Figure 22. Header File: <sys/ioctl.h>

    #define IOCPARM_MASK 0xff
    #define IOC_VOID     0x20000000
    #define IOC_OUT      0x40000000
    #define IOC_IN       0x80000000
    #define IOC_INOUT    (IOC_IN|IOC_OUT)
    #define _IO(x,y)     (IOC_VOID|(x<<8)|y)
    #define _IOR(x,y,t)  (IOC_OUT|((((int)sizeof(t)) \
                                      &IOCPARM_MASK)<<16)|(x<<8)|y)
    #define _IORN(x,y,t) (IOC_OUT|(((t) \
                                      &IOCPARM_MASK)<<16)|(x<<8)|y)
    #define _IOW(x,y,t)  (IOC_IN|((((int)sizeof(t)) \
                                      &IOCPARM_MASK)<<16)|(x<<8)|y)
    #define _IOWN(x,y,t) (IOC_IN|(((t) \
                                      &IOCPARM_MASK)<<16)|(x<<8)|y)
    #define _IOWR(x,y,t) (IOC_INOUT|((((int)sizeof(t)) \
                                      &IOCPARM_MASK)<<16)|(x<<8)|y)
    
    #define SIOCSHIWAT     _IOW('s',  0, int)
    #define SIOCGHIWAT     _IOR('s',  1, int)
    #define SIOCSLOWAT     _IOW('s',  2, int)
    #define SIOCGLOWAT     _IOR('s',  3, int)
    #define SIOCATMARK     _IOR('s',  7, int)
    #define SIOCSPGRP      _IOW('s',  8, int)
    #define SIOCGPGRP      _IOR('s',  9, int)
    #define SIOCADDRT      _IOW('r', 10, struct rtentry)
    #define SIOCDELRT      _IOW('r', 11, struct rtentry)
    #define SIOCSIFADDR    _IOW('i', 12, struct ifreq)
    #define SIOCGIFADDR    _IOWR('i',13, struct ifreq)
    #define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq)
    #define SIOCGIFDSTADDR _IOWR('i',15, struct ifreq)
    #define SIOCSIFFLAGS   _IOW('i', 16, struct ifreq)
    #define SIOCGIFFLAGS   _IOWR('i',17, struct ifreq)
    #define SIOCSIFMEM     _IOW('i', 18, struct ifreq)
    #define SIOCGIFMEM     _IOWR('i',19, struct ifreq)
    #define SIOCGIFCONF    _IOWR('i',20, struct ifconf)
    #define SIOCSIFMTU     _IOW('i', 21, struct ifreq)
    #define SIOCGIFMTU     _IOWR('i',22, struct ifreq)
    #define SIOCGIFBRDADDR _IOWR('i',23, struct ifreq)
    #define SIOCSIFBRDADDR _IOW('i',24, struct ifreq)
    #define SIOCGIFNETMASK _IOWR('i',25, struct ifreq)
    #define SIOCSIFNETMASK _IOW('i',26, struct ifreq)
    #define SIOCGIFMETRIC  _IOWR('i',27, struct ifreq)
    #define SIOCSIFMETRIC  _IOW('i',28, struct ifreq)
    #define SIOCSARP       _IOW('i', 30, struct arpreq)
    #define SIOCGARP       _IOWR('i',31, struct arpreq)
    #define SIOCDARP       _IOW('i', 32, struct arpreq)
    #define SIOCUPPER      _IOW('i', 40, struct ifreq)
    #define SIOCLOWER      _IOW('i', 41, struct ifreq)
    #define SIOCSETSYNC    _IOW('i',  44, struct ifreq)
    #define SIOCGETSYNC    _IOWR('i', 45, struct ifreq)
    #define SIOCSSDSTATS   _IOWR('i', 46, struct ifreq)
    #define SIOCSSESTATS   _IOWR('i', 47, struct ifreq)
    #define SIOCSPROMISC   _IOW('i', 48, int)
    #define SIOCADDMULTI   _IOW('i', 49, struct ifreq)
    #define SIOCDELMULTI   _IOW('i', 50, struct ifreq)
    #define SIOCPROTO      _IOW('s', 51, struct socknewproto)
    #define SIOCGETNAME    _IOR('s', 52, struct sockaddr)
    #define SIOCGETPEER    _IOR('s', 53, struct sockaddr)
    #define IF_UNITSEL     _IOW('s', 54, int)
    #define SIOCXPROTO     _IO('s', 55)
    #define SIOCIFDETACH   _IOW('i', 56, struct ifreq)
    #define SIOCGENPSTATS  _IOWR('i', 57, struct ifreq)
    #define SIOCX25XMT     _IOWR('i', 59, struct ifreq)
    #define SIOCX25RCV     _IOWR('i', 60, struct ifreq)
    #define SIOCX25TBL     _IOWR('i', 61, struct ifreq)
    #define SIOCSLGETREQ   _IOWR('i', 71, struct ifreq)
    #define SIOCSLSTAT     _IOW('i', 72, struct ifreq)
    #define SIOCSIFNAME    _IOW('i', 73, struct ifreq)
    #define SIOCGENADDR    _IOWR('i', 85, struct ifreq)
    #define SIOCSOCKSYS    _IOW('i', 86, struct socksysreq)
    

    Figure 23. Header File: <netdb.h>

    struct hostent {
           char   *h_name;
           char   **h_aliases;
           int    h_addrtype;
           int    h_length;
           char   **h_addr_list;
    #define   h_addr   h_addr_list[0]
    };
    
    struct netent {
           char           *n_name;
           char           **n_aliases;
           int            n_addrtype;
           unsigned long  n_net;
    };
    
    struct protoent {
           char  *p_name;
           char  **p_aliases;
           int   p_proto;
    };
    
    struct servent {
           char   *s_name;
           char   **s_aliases;
           int    s_port;
           char   *s_proto;
    };
    

    Figure 24. Header File: <net/route.h>

    struct rtentry {
           u_long   rt_hash;
           struct   sockaddr rt_dst;
           struct   sockaddr rt_gateway;
           short    rt_flags;
           short    rt_refcnt;
           u_long   rt_use;
           union {
                   struct  ip_provider *rtu_prov;
                   struct  ifnet *rtu_ifp;
           } rt_u;
    #define rt_prov rt_u.rtu_prov
    #define rt_ifp
           rt_u.rtu_ifp
    };
    
    #define RTF_UP         0x1
    #define RTF_GATEWAY    0x2
    #define RTF_HOST       0x4
    #define RTF_REINSTATE  0x8
    #define RTF_DYNAMIC    0x10
    #define RTF_MODIFIED   0x20
    
    #define RTF_SWITCHED   0x40
    #define RTF_SLAVE      0x80
    #define RTF_REMOTE     0x100
    #define RTF_TOSWITCH   0x200
    

    Figure 25. Header File: <sys/socket.h>

    #define  AF_UNSPEC      0
    #define  AF_UNIX        1
    #define  AF_INET        2
    #define  AF_IMPLINK     3
    #define  AF_PUP         4
    #define  AF_CHAOS       5
    #define  AF_NS          6
    #define  AF_NBS         7
    #define  AF_ECMA        8
    #define  AF_DATAKIT     9
    #define  AF_CCITT      10
    #define  AF_SNA        11
    #define  AF_DECnet     12
    #define  AF_DLI        13
    #define  AF_LAT        14
    #define  AF_HYLINK     15
    #define  AF_APPLETALK  16
    #define  AF_NIT        17
    #define  AF_802        18
    #define  AF_OSI        19
    #define  AF_X25        20
    #define  AF_OSINET     21
    #define  AF_GOSIP      22
    
    struct sockaddr {
           u_short  sa_family;
           char     sa_data[14];
    };
    
    #define  SO_DEBUG       0x0001
    #define  SO_ACCEPTCONN  0x0002
    #define  SO_REUSEADDR   0x0004
    #define  SO_KEEPALIVE   0x0008
    #define  SO_DONTROUTE   0x0010
    #define  SO_BROADCAST   0x0020
    #define  SO_USELOOPBACK 0x0040
    #define  SO_LINGER      0x0080
    #define  SO_OOBINLINE   0x0100
    #define  SO_IMASOCKET   0x0400
    #define  SOL_SOCKET     0xffff
    
    struct linger {
           int   l_onoff;
           int   l_linger;
    };
    
    #define  SOCK_DGRAM     1
    #define  SOCK_STREAM    2
    #define  SOCK_RAW       4
    #define  SOCK_RDM       5
    #define  SOCK_SEQPACKET 6
    
    #define  PF_UNSPEC     AF_UNSPEC
    #define  PF_UNIX       AF_UNIX
    #define  PF_INET       AF_INET
    #define  PF_IMPLINK    AF_IMPLINK
    #define  PF_PUP        AF_PUP
    #define  PF_CHAOS      AF_CHAOS
    #define  PF_NS         AF_NS
    #define  PF_NBS        AF_NBS
    #define  PF_ECMA       AF_ECMA
    #define  PF_DATAKIT    AF_DATAKIT
    #define  PF_CCITT      AF_CCITT
    #define  PF_SNA        AF_SNA
    #define  PF_DECnet     AF_DECnet
    #define  PF_DLI        AF_DLI
    #define  PF_LAT        AF_LAT
    #define  PF_HYLINK     AF_HYLINK
    #define  PF_APPLETALK  AF_APPLETALK
    #define  PF_NIT        AF_NIT
    #define  PF_802        AF_802
    #define  PF_OSI        AF_OSI
    #define  PF_X25        AF_X25
    #define  PF_OSINET     AF_OSINET
    #define  PF_GOSIP      AF_GOSIP
    
    struct msghdr {
           caddr_t  msg_name;
           int      msg_namelen;
           struct   iovec *msg_iov;
           int      msg_iovlen;
           caddr_t  msg_accrights;
           int      msg_accrightslen;
    };
    
    #define  MSG_OOB       0x1
    #define  MSG_PEEK      0x2
    #define  MSG_DONTROUTE 0x4
    
    struct socknewproto {
           int     family;
           int     type;
           int     proto;
           dev_t   dev;
           int     flags;
    };
    
    struct socksysreq {
           int     args[7];
    };
    

    Figure 26. Header File: <sys/types.h>

    #ifndef   FD_SETSIZE
    #define   FD_SETSIZE   1024
    #endif
    
    #ifndef NBBY
    #define NBBY 8
    #endif
    
    typedef   long     fd_mask;
    #define   NFDBITS (sizeof(fd_mask) * NBBY)
    #ifndef   howmany
    #define   howmany(x, y)  (((x)+((y)-1))/(y))
    #endif
    
    typedef struct fd_set {
            fd_mask   fds_bits[howmany(FD_SETSIZE, NFDBITS)];
            } fd_set;
    
    #define  FD_SET(n, p)   ((p)->fds_bits[(n)/NFDBITS] \
    				|= (1 << ((n) % NFDBITS)))
    #define  FD_CLR(n, p)   ((p)->fds_bits[(n)/NFDBITS] \
    				&= ~(1 << ((n) % NFDBITS)))
    #define  FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] \
    				&  (1 << ((n) % NFDBITS)))
    #define  FD_ZERO(p)     memset((char *)(p), 0, sizeof(*(p)))
    

    Figure 27. Header File: <sys/un.h>

    struct sockaddr_un {
           short   sun_family;
           char    sun_path[108];
    };
    

    ABI Library

    The entire ABI Library section is new as of Version 1.2 of the Conformance Guide, but will not be marked with diffmarks.

    Asynchronous Input and Output

    The library libabi.so.1 contains routines which perform asynchronous I/O operations. These are based on the asynchronous I/O routines documented in the POSIX 1003.1b (Real-Time) standard, but using callback functions for completion notification rather than real-time signals. This allows for more flexible operation and, in some implementations, increased performance. Since it is based on the POSIX standard, that standard should be consulted in concert with this one for full details.

    Figure 28. libabi Contents

    aio_cancel*         aio_error*          aio_fsync*
    aio_hold*           aio_read*           aio_return*
    aio_suspend*        aio_write*          lio_listio*
    

    *Function is new to version 1.2

    These routines have the equivalent behavior, except for the restrictions listed on page %restrictions%, to routines in the POSIX 1003.1b specification. The aio_hold routine does not have a POSIX equivalent.

    Data Definitions

    The header file includes definitions of the data structures and constants used by many of the asynchronous I/O function interfaces. It should also include the function prototypes. Data structures and constants related to completion notification are defined in Defines for hard-coded operational limits are in Error codes for asynchronous I/O are in Defines allowing querying for run-time limits are in In the following figures, the C-style comment text is intended to be descriptive, but does not itself form part of the standard.

    Figure 29. Header File: aio.h

    /* for aio_cancel() return values */
    #define AIO_CANCELED      1 /* all operations canceled */
    #define AIO_NOTCANCELED   2 /* some ops could not be canceled */
    #define AIO_ALLDONE       3 /* no ops could be canceled, all done */
    
    /* for aiocb.lio_opcode */
    #define LIO_NOP           0 /* listio request with no data xfer */
    #define LIO_READ          1 /* listio read request */
    #define LIO_WRITE         2 /* listio write request */
    
    /* for lio_listio mode flag */
    #define LIO_WAIT          4 /* suspend until lio_listio complete */
    #define LIO_NOWAIT        3 /* do not suspend or notify for lio_listio */
    
    /* for aio_hold routine */
    #define AIO_HOLD_CALLBACK      1
    #define AIO_RELEASE_CALLBACK   2
    #define AIO_ISHELD_CALLBACK    3
    
    typedef struct aiocb {
        int              aio_fildes;       /* file descriptor */
        volatile void    *aio_buf;         /* data buffer location */
        size_t           aio_nbytes;       /* number bytes of data */
        off_t            aio_offset;       /* file offset */
        int              aio_reqprio;      /* request priority */
        struct sigevent  aio_sigevent;     /* notification method */
        int              aio_lio_opcode;   /* listio operation */
        ulong            aio_reserved[7];  /* reserved for internal use */
        ulong            aio_pad[6];
    } aiocb_t;
    
    /* prototypes */
    int aio_read(aiocb_t *);
    int aio_write(aiocb_t *);
    int lio_listio(int, aiocb_t * const [], int, sigevent_t *);
    int aio_error(const aiocb_t *);
    int aio_return(aiocb_t *);
    int aio_cancel(int, aiocb_t *);
    int aio_suspend(const aiocb_t * const [], int, const struct timespec *);
    int aio_fsync(int op, aiocb_t *);
    int aio_hold(int);
    

    Figure 30. Header File: <signal.h>

    typedef union {
           int    nisigno;                  /* signal number */
           void   (*nifunc)(union sigval);  /* callback data */
    } notifyinfo_t;
    
    typedef union sigval {
           int    sival_int;       /* integer notify value */
           void   *sival_ptr;      /* pointer notify value */
    } sigval_t;
    
    typedef struct sigevent {
           int           sigev_notify;       /* notification type */
           notifyinfo_t  sigev_notifyinfo;   /* notification info */
           sigval_t      sigev_value;        /* notification handler argument */
           ulong         sigev_reserved[13]; /* reserved for internal use */
           ulong         sigev_pad[6];       /* reserved for future use */
    } sigevent_t;
    
    #define sigev_func  sigev_notifyinfo.nifunc
    #define sigev_signo sigev_notifyinfo.nisigno
    
    /* values of sigev_notify */
    #define SIGEV_NONE              128 /* no async notification */
    #define SIGEV_SIGNAL            129 /* queued signal notification
                                           NOT SUPPORTED for MIPS ABI */
    #define SIGEV_CALLBACK          130 /* callback notification */
    

    Figure 31. Header File: <limits.h>

    #define _POSIX_AIO_LISTIO_MAX   2
    #define _POSIX_AIO_MAX          1
    
    #define _ABI_AIO_XFER_MAX       (128*1024) /* minimum max value */
    

    Figure 32. Header File: <errno.h>

    #define EINPROGRESS 150
    #define ECANCELED   158
    

    Figure 33. Header File: <unistd.h>

    #define _SC_ASYNCHRONOUS_IO     64 /* is POSIX AIO supported? */
    #define _SC_ABI_ASYNCHRONOUS_IO 65 /* is ABI AIO supported? */
    #define _SC_AIO_LISTIO_MAX      66 /* max listio operation */
    #define _SC_AIO_MAX             67 /* max AIO */
    #define _PC_ASYNC_IO            64 /* can this file do POSIX AIO? */
    #define _PC_ABI_ASYNC_IO        65 /* can this file do ABI AIO? */
    #define _PC_ABI_AIO_XFER_MAX    66 /* biggest ABI AIO xfer for this file */
    

    _SC_ASYNCHRONOUS and _PC_ASYNCIO are included for completeness, for checking for strict POSIX conformance. An ABI-conforming application would not query for POSIX, but rather for the ABI values.

    Function Interfaces

    The operation and error returns from all functions except aio_hold are those of the corresponding POSIX 1003.1b definition with the substitution of callback functions for notification by real-time signals. In addition to the specified error returns, the functions which correspond to POSIX 1003.1b functions can also set to the following value:

    Implementation

    The element in the structure may have the values or These values, as well as (which is not used but reserved) are chosen to have values so that an implementation can easily distinguish calls to the ABI implementation of async I/O from similar co- existing implementations. In particular, these values are chosen to be larger than The element in the union is unused in this version, but is provided for possible future changes. If the element of the structure is set to (which can also be referred to as indicates the function to be invoked when the operation completes. That function will be called with a single argument, which is the value in and will use the current stack indicated by the register. The execution context in which callback functions are invoked is undefined, however the callback has access to all global data and functions. All operations require the and fields to be set to zero. In keeping with the POSIX 1003.1b standard, limits are generally not hardcoded. Instead, applications should use to query for system-wide limits, and for per-file limits. Unlike in the POSIX standard, no extensions to the data structures are allowed. The implementation may use the reserved fields for internal purposes.

    Restrictions

    The following restrictions must be observed by applications using this facility: Application vendors are cautioned that these interfaces are present only in systems which comply with Version 1.2 and above of this document. These interfaces are new to the ABI and may not be immediately available on all platforms. Operating system implementors are advised that parallelized lio_listio implementations, in which many I/O operations are in progress at a given time are strongly desired by the DBMS community. Simply serially processing the lio_listio call may not be of much benefit to the DBMS community. If the implementation chooses to use threads, then the system-supplied libraries must be thread-safe.

    X Window System Library

    Graphical MIPS ABI-conforming applications may be constructed using the X Window System, Version 11, Release 5 (X11R5). The generic ABI specifies X11R3 but indicates an intent to track upward compatible future releases of the X Window System. Prior versions of this document relied on the generic ABI specification of X11R4 and did not have MIPS ABI extensions in this area. This library is required on all ABI-conforming systems. The basic X11 support library, shall be supported as a DSO, by ABI-conforming systems. (libX11.so.1 is reserved for implementations that may have had X11R4 versions.) The X Toolkit Intrinsics library, libXt, is supplied as a static archive in the ABI build environment. The following functions reside in and must be provided on all ABI-conforming systems.

    Figure 34. libX Contents

    XActivateScreenSaver     XAddExtension             XAddHost
    XAddHosts                XAddPixel                 XAddToExtensionList
    XAddToSaveSet            XAllocClassHint           XAllocColor
    XAllocColorCells         XAllocColorPlanes         XAllocIconSize
    XAllocNamedColor         XAllocSizeHints           XAllocStandardColormap
    XAllocWMHints            XAllowEvents              XAllPlanes
    XAutoRepeatOff           XAutoRepeatOn             XBaseFontNameListOfFontSet
    XBell                    XBitmapBitOrder           XBitmapPad
    XBitmapUnit              XBlackPixel               XBlackPixelOfScreen
    XCellsOfScreen           XChangeActivePointerGrab  XChangeGC
    XChangeKeyboardControl   XChangeKeyboardMapping    XChangePointerControl
    XChangeProperty          XChangeSaveSet            XChangeWindowAttributes
    XCheckIfEvent            XCheckMaskEvent           XCheckTypedEvent
    XCheckTypedWindowEvent   XCheckWindowEvent         XCirculateSubwindows
    XCirculateSubwindowsDown XCirculateSubwindowsUp    XClearArea
    XClearWindow             XClipBox                  XCloseDisplay
    XCloseIM                 XcmsAddColorSpace         XcmsAddFunctionSet
    XcmsAllocColor           XcmsAllocNamedColor       XcmsCCCOfColormap
    XcmsCIELabClipab         XcmsCIELabClipL           XcmsCIELabClipLab
    XcmsCIELabQueryMaxC      XcmsCIELabQueryMaxL       XcmsCIELabQueryMaxLC
    XcmsCIELabQueryMinL      XcmsCIELabToCIEXYZ        XcmsCIELabWhiteShiftColors
    XcmsCIELuvClipL          XcmsCIELuvClipLuv         XcmsCIELuvClipuv
    XcmsCIELuvQueryMaxC      XcmsCIELuvQueryMaxL       XcmsCIELuvQueryMaxLC
    XcmsCIELuvQueryMinL      XcmsCIELuvToCIEuvY        XcmsCIELuvWhiteShiftColors
    XcmsCIEuvYToCIELuv       XcmsCIEuvYToCIEXYZ        XcmsCIEuvYToTekHVC
    XcmsCIExyYToCIEXYZ       XcmsCIEXYZToCIELab        XcmsCIEXYZToCIEuvY
    XcmsCIEXYZToCIExyY       XcmsCIEXYZToRGBi          XcmsClientWhitePointOfCCC
    XcmsConvertColors        XcmsCreateCCC             XcmsDefaultCCC
    XcmsDisplayOfCCC         XcmsFormatOfPrefix        XcmsFreeCCC
    XcmsLookupColor          XcmsPrefixOfFormat        XcmsQueryBlack
    XcmsQueryBlue            XcmsQueryColor            XcmsQueryColors
    XcmsQueryGreen           XcmsQueryRed              XcmsQueryWhite
    XcmsRGBiToCIEXYZ         XcmsRGBiToRGB             XcmsRGBToRGBi
    XcmsScreenNumberOfCCC    XcmsScreenWhitePointOfCCC XcmsSetCCCOfColormap
    XcmsSetCompressionProc   XcmsSetWhiteAdjustProc    XcmsSetWhitePoint
    XcmsStoreColor           XcmsStoreColors           XcmsTekHVCClipC
    XcmsTekHVCClipV          XcmsTekHVCClipVC          XcmsTekHVCQueryMaxC
    XcmsTekHVCQueryMaxV      XcmsTekHVCQueryMaxVC      XcmsTekHVCQueryMaxVSamples
    XcmsTekHVCQueryMinV      XcmsTekHVCToCIEuvY        XcmsTekHVCWhiteShiftColors
    XcmsVisualOfCCC          XConfigureWindow          XConnectionNumber
    XContextDependentDrawing XConvertSelection         XCopyArea
    XCopyColormapAndFree     XCopyGC                   XCopyPlane
    XCreateBitmapFromData    XCreateColormap           XCreateFontCursor
    XCreateFontSet           XCreateGC                 XCreateGlyphCursor
    XCreateIC                XCreateImage              XCreatePixmap
    XCreatePixmapCursor      XCreatePixmapFromBitmapData  XCreateRegion
    XCreateSimpleWindow      XCreateWindow             XDefaultColormap
    XDefaultColormapOfScreen XDefaultDepth             XDefaultDepthOfScreen
    XDefaultGC               XDefaultGCOfScreen        XDefaultRootWindow
    XDefaultScreen           XDefaultScreenOfDisplay   XDefaultString
    XDefaultVisual           XDefaultVisualOfScreen    XDefineCursor
    XDeleteContext           XDeleteModifiermapEntry   XDeleteProperty
    XDestroyIC               XDestroyImage             XDestroyRegion
    XDestroySubwindows       XDestroyWindow            XDisableAccessControl
    XDisplayCells            XDisplayHeight            XDisplayHeightMM
    XDisplayKeycodes         XDisplayMotionBufferSize  XDisplayName
    XDisplayOfIM             XDisplayOfScreen          XDisplayPlanes
    XDisplayString           XDisplayWidth             XDisplayWidthMM
    XDoesBackingStore        XDoesSaveUnders           XDrawArc
    XDrawArcs                XDrawImageString          XDrawImageString16
    XDrawLine                XDrawLines                XDrawPoint
    XDrawPoints              XDrawRectangle            XDrawRectangles
    XDrawSegments            XDrawString               XDrawString16
    XDrawText                XDrawText16               XEHeadOfExtensionList
    XEmptyRegion             XEnableAccessControl      XEqualRegion
    XESetCloseDisplay        XESetCopyGC               XESetCreateFont
    XESetCreateGC            XESetError                XESetErrorString
    XESetEventToWire         XESetFlushGC              XESetFreeFont
    XESetFreeGC              XESetPrintErrorValues     XESetWireToError
    XESetWireToEvent         XEventMaskOfScreen        XEventsQueued
    XExtentsOfFontSet        XFetchBuffer              XFetchBytes
    XFetchName               XFillArc                  XFillArcs
    XFillPolygon             XFillRectangle            XFillRectangles
    XFilterEvent             XFindContext              XFindOnExtensionList
    XFlush                   XFlushGC                  XFontsOfFontSet
    XForceScreenSaver        XFree                     XFreeColormap
    XFreeColors              XFreeCursor               XFreeExtensionList
    XFreeFont                XFreeFontInfo             XFreeFontNames
    XFreeFontPath            XFreeFontSet              XFreeGC
    XFreeModifiermap         XFreePixmap               XFreeStringList
    XGContextFromGC          XGeometry                 XGetAtomName
    XGetClassHint            XGetCommand               XGetDefault
    XGetErrorDatabaseText    XGetErrorText             XGetFontPath
    XGetFontProperty         XGetGCValues              XGetGeometry
    XGetIconName             XGetIconSizes             XGetICValues
    XGetImage                XGetIMValues              XGetInputFocus
    XGetKeyboardControl      XGetKeyboardMapping       XGetModifierMapping
    XGetMotionEvents         XGetNormalHints           XGetPixel
    XGetPointerControl       XGetPointerMapping        XGetRGBColormaps
    XGetScreenSaver          XGetSelectionOwner        XGetSizeHints
    XGetStandardColormap     XGetSubImage              XGetTextProperty
    XGetTransientForHint     XGetVisualInfo            XGetWindowAttributes
    XGetWindowProperty       XGetWMClientMachine       XGetWMColormapWindows
    XGetWMHints              XGetWMIconName            XGetWMName
    XGetWMNormalHints        XGetWMProtocols           XGetWMSizeHints
    XGetZoomHints            XGrabButton               XGrabKey
    XGrabKeyboard            XGrabPointer              XGrabServer
    XHeightMMOfScreen        XHeightOfScreen           XIconifyWindow
    XIfEvent                 XImageByteOrder           XIMOfIC
    XInitExtension           XInsertModifiermapEntry   XInstallColormap
    XInternAtom              XIntersectRegion          XKeycodeToKeysym
    XKeysymToKeycode         XKeysymToString           XKillClient
    XLastKnownRequestProcessed   XListDepths           XListExtensions
    XListFonts               XListFontsWithInfo        XListHosts
    XListInstalledColormaps  XListPixmapFormats        XListProperties
    XLoadFont                XLoadQueryFont            XLocaleOfFontSet
    XLocaleOfIM              XLookupColor              XLookupKeysym
    XLookupString            XLowerWindow              XMapRaised
    XMapSubwindows           XMapWindow                XMaskEvent
    XMatchVisualInfo         XMaxCmapsOfScreen         XMaxRequestSize
    XmbDrawImageString       XmbDrawString             XmbDrawText
    XmbLookupString          XmbResetIC                XmbSetWMProperties
    XmbTextEscapement        XmbTextExtents            XmbTextListToTextProperty
    XmbTextPerCharExtents    XmbTextPropertyToTextList XMinCmapsOfScreen
    XMoveResizeWindow        XMoveWindow               XNewModifiermap
    XNextEvent               XNextRequest              XNoOp
    XOffsetRegion            XOpenDisplay              XOpenIM
    XParseColor              XParseGeometry            XPeekEvent
    XPeekIfEvent             XPending                  Xpermalloc
    XPlanesOfScreen          XPointInRegion            XPolygonRegion
    XProtocolRevision        XProtocolVersion          XPutBackEvent
    XPutImage                XPutPixel                 XQLength
    XQueryBestCursor         XQueryBestSize            XQueryBestStipple
    XQueryBestTile           XQueryColor               XQueryColors
    XQueryExtension          XQueryFont                XQueryKeymap
    XQueryPointer            XQueryTextExtents         XQueryTextExtents16
    XQueryTree               XRaiseWindow              XReadBitmapFile
    XRebindKeysym            XRecolorCursor            XReconfigureWMWindow
    XRectInRegion            XRefreshKeyboardMapping   XRemoveFromSaveSet
    XRemoveHost              XRemoveHosts              XReparentWindow
    XResetScreenSaver        XResizeWindow             XResourceManagerString
    XRestackWindows          XrmCombineDatabase        XrmCombineFileDatabase
    XrmDestroyDatabase       XrmEnumerateDatabase      XrmGetDatabase
    XrmGetFileDatabase       XrmGetResource            XrmGetStringDatabase
    XrmInitialize            XrmLocaleOfDatabase       XrmMergeDatabases
    XrmParseCommand          XrmPermStringToQuark      XrmPutFileDatabase
    XrmPutLineResource       XrmPutResource            XrmPutStringResource
    XrmQGetResource          XrmQGetSearchList         XrmQGetSearchResource
    XrmQPutResource          XrmQPutStringResource     XrmQuarkToString
    XrmSetDatabase           XrmStringToBindingQuarkList XrmStringToQuark
    XrmStringToQuarkList     XrmUniqueQuark            XRootWindow
    XRootWindowOfScreen      XRotateBuffers            XRotateWindowProperties
    XSaveContext             XScreenCount              XScreenNumberOfScreen
    XScreenOfDisplay         XScreenResourceString     XSelectInput
    XSendEvent               XServerVendor             XSetAccessControl
    XSetAfterFunction        XSetArcMode               XSetBackground
    XSetClassHint            XSetClipMask              XSetClipOrigin
    XSetClipRectangles       XSetCloseDownMode         XSetCommand
    XSetDashes               XSetErrorHandler          XSetFillRule
    XSetFillStyle            XSetFont                  XSetFontPath
    XSetForeground           XSetFunction              XSetGraphicsExposures
    XSetICFocus              XSetIconName              XSetIconSizes
    XSetICValues             XSetInputFocus            XSetIOErrorHandler
    XSetLineAttributes       XSetLocaleModifiers       XSetModifierMapping
    XSetNormalHints          XSetPlaneMask             XSetPointerMapping
    XSetRegion               XSetRGBColormaps          XSetScreenSaver
    XSetSelectionOwner       XSetSizeHints             XSetStandardColormap
    XSetStandardProperties   XSetState                 XSetStipple
    XSetSubwindowMode        XSetTextProperty          XSetTile
    XSetTransientForHint     XSetTSOrigin              XSetWindowBackground
    XSetWindowBackgroundPixmap XSetWindowBorder        XSetWindowBorderPixmap
    XSetWindowBorderWidth    XSetWindowColormap        XSetWMClientMachine
    XSetWMColormapWindows    XSetWMHints               XSetWMIconName
    XSetWMName               XSetWMNormalHints         XSetWMProperties
    XSetWMProtocols          XSetWMSizeHints           XSetZoomHints
    XShrinkRegion            XStoreBuffer              XStoreBytes
    XStoreColor              XStoreColors              XStoreName
    XStoreNamedColor         XStringListToTextProperty XStringToKeysym
    XSubImage                XSubtractRegion           XSupportsLocale
    XSync                    XSynchronize              XTextExtents
    XTextExtents16           XTextPropertyToStringList XTextWidth
    XTextWidth16             XTranslateCoordinates     XUndefineCursor
    XUngrabButton            XUngrabKey                XUngrabKeyboard
    XUngrabPointer           XUngrabServer             XUninstallColormap
    XUnionRectWithRegion     XUnionRegion              XUnloadFont
    XUnmapSubwindows         XUnmapWindow              XUnsetICFocus
    XVaCreateNestedList      XVendorRelease            XVisualIDFromVisual
    XWarpPointer             XwcDrawImageString        XwcDrawString
    XwcDrawText              XwcFreeStringList         XwcLookupString
    XwcResetIC               XwcTextEscapement         XwcTextExtents
    XwcTextListToTextProperty XwcTextPerCharExtents    XwcTextPropertyToTextList
    XWhitePixel              XWhitePixelOfScreen       XWidthMMOfScreen
    XWidthOfScreen           XWindowEvent              XWithdrawWindow
    XWMGeometry              XWriteBitmapFile          XXorRegion
    _XAllocScratch           _XEatData                 _XFlush
    _XFlushGCCache           _XRead                    _XReadEvents
    _XReadPad                _XReply                   _XSend
    _XSetLastRequestRead
    

    The library requires that some global external data symbols be defined for its' routines to work properly. All the data symbols listed in the table below must be provided by the library.

    Figure 35. libX Contents, Global External Data Symbols

    XcmsCIELabColorSpace     XcmsCIELuvColorSpace
    XcmsCIEuvYColorSpace     XcmsCIExyYColorSpace
    XcmsCIEXYZColorSpace     XcmsLinearRGBFunctionSet
    XcmsRGBColorSpace        XcmsRGBiColorSpace
    XcmsTekHVCColorSpace     XcmsUNDEFINEDColorSpace
    

    An ABI-conforming system shall provide the following include files whose content is defined by the X11R5 Reference Manual.

    Figure 36. X11R5 Include Files

    X11/cursorfont.h    X11/keysymdef.h     X11/X.h
    X11/Xatom.h         X11/Xcms.h          X11/Xlib.h
    X11/Xproto.h        X11/Xresource.h     X11/Xutil.h
    

    Figure 37. X11R5 X Toolkit Intrinsics Include Files

    X11/Intrinsic.h     X11/IntrinsicP.h    X11/Shell.h
    X11/ShellP.h        X11/StringDefs.h    X11/Vendor.h
    X11/VendorP.h
    

    Math Library

    Frequently, applications must rely on groups of object files not required to be present on an ABI conforming implementation. These may be provided in static archives provided with the development environment. If each member of the archive is itself ABI conforming, then an ABI conforming application may statically link members from this archive and still be ABI conforming. If extensions to an archive are not ABI conforming, then an ABI conforming application may not include that extension in an executable. All development environments for ABI applications shall contain ABI conforming versions of The MIPS processor specific ABI shall define the path to the directory that contains these libraries. The following are entry-points that must be defined for each respective library, as defined in the

    Figure 38. Required libm Functions

    acos      acosh    asin      asinh    atan*    atan2
    atanh     cbrt     ceil      cos      cosh     erf
    erfc      exp      fabs      floor    fmod     gamma
    hypot*    j0       j1        jn       lgamma   log
    log10     pow      remainder sin      sinh     sqrt
    tan       tanh     y0        y1       yn
    

    *Function was erroneously omitted from earlier editions

    OSF/Motif Library

    An ABI-conforming system shall support Release 1.2 of the OSF/Motif software as a static library in the ABI build environment, The first ABI reference platform (corresponding to version 1.0 of this specification) supported OSF/Motif 1.1 as a static library. An ABI-conforming system shall provide the following include files whose content is defined by the

    Figure 39. OSF/Motif 1.2 Include Files

    Xm/ArrowB.h    Xm/ArrowBG.h   Xm/BulletinB.h
    Xm/CascadeB.h  Xm/CascadeBG.h Xm/Command.h
    Xm/CutPaste.h  Xm/DialogS.h   Xm/DrawingA.h
    Xm/DrawnB.h    Xm/FileSB.h    Xm/Form.h
    Xm/Frame.h     Xm/Label.h     Xm/LabelG.h
    Xm/List.h      Xm/MainW.h     Xm/MenuShell.h
    Xm/MessageB.h  Xm/PanedW.h    Xm/Protocols.h
    Xm/PushB.h     Xm/PushBG.h    Xm/RowColumn.h
    Xm/Scale.h     Xm/ScrollBar.h Xm/ScrolledW.h
    Xm/SelectioB.h Xm/SeparatoG.h Xm/Separator.h
    Xm/Text.h      Xm/ToggleB.h   Xm/ToggleBG.h
    Xm/Xm.h        Xm/XmP.h
    

    General-Purpose Library

    These functions constitute a general-purpose library, This library is not implemented as a shared object. It is required to link OSF/Motif applications.

    Figure 40. libgen Contents

    basename       bgets          bufsplit       copylist
    dirname        eaccess        gmatch         isencrypt
    mkdirp         p2open         p2close        pathfind
    regcmp         regex          rmdirp         strcadd
    strccpy        streadd        strecpy        strfind
    strrspn        strtrns
    compile*       step*          advance*
    

    * Listed as Level 2 in the SVID These functions are declared in
    char   * basename(char *);
    char   * bgets(char *, size_t, FILE *, char *);
    size_t   bufsplit(char *, size_t, const char *);
    char   * copylist(const char *, off_t *);
    char   * dirname(char *);
    int      eaccess(const char *, int);
    int      gmatch(const char *, const char *);
    int      isencrypt(const char *, size_t);
    int      mkdirp(const char *, mode_t);
    int      p2open(const char *, FILE *[2]);
    int      p2close(FILE *[2]);
    char   * pathfind(const char *, const char *, const char *);
    char   * regcmp(const char *, ...);
    char   * regex(const char *, const char *, ...);
    int      rmdirp(char *, char *);
    char   * strccpy(char *, const char *);
    char   * strcadd(char *, const char *);
    char   * strecpy(char *, const char *, const char *);
    char   * streadd(char *, const char *, const char *);
    int      strfind(const char *, const char *);
    char   * strrspn(const char *, const char *);
    char   * strtrns(const char *, const char *, const char *, char *);
    
    These functions are declared in and operate as described in the System V Interface Definition, Third Edition. Note that the description in the SVID refers to a different implementation, and refereneces a different header file, not the implementation. In any case, these routines are marked as level 2 and should be avoided, as they are not required to be present on an ABI-conforming system.
    char   * compile(const char *, char *, char *);
    int      step(const char *, const char *);
    int      advance(const char *, const char *);
    

    BSD Emulation Library

    provides many of the popular interfaces from BSD UNIX. It is intended to be used as a migration path for ISVs moving applications from BSD UNIX to SVR4. Over time all ISVs are encouraged to move to the SVR4 ABI interfaces since they may not be supported in the future. It is also important to note that use of pulls in all of its BSD interfaces. This can result in subtle problems for applications which mix BSD and SVR4 interfaces, for example using the BSD and SVR4 In the previous case, both the and calls would use the BSD version. This class of problem will be exposed at runtime rather than compile time.

    Figure 41. libucb Contents

    alloca                alphasort           bcmp
    bcopy                 bzero               dbm_close
    dbm_delete            dbm_do_nextkey      dbm_fetch
    dbm_firsthash         dbm_firstkey        dbm_forder
    dbm_nextkey           dbm_open            dbm_store
    dc                    endusershell        fopen
    fp_accrued_exceptions fp_class_d          fp_class_f
    fp_direction          fp_precision        fprintf
    ftime                 getdtablesize       gethostid
    gethostname           getpagesize         getrusage
    getusershell          getwd               ieee_handlers
    index                 initstate           isnan
    killpg                longjmp             mctl
    mkstemp               printf              psignal
    rand                  random              re_comp
    re_exec               readdir             rindex
    scandir               sethostname         setjmp
    setstate              setusershell        sigblock
    sigfpe                siginterrupt        signal
    sigpause              sigsetmask          sigstack
    sigvec                sleep               sprintf
    srand                 srandom             strcasecmp
    strncasecmp           sys_siglist         times
    timezone              ualarm              usleep
    utimes                vfprintf            vprintf
    vsprintf              wait3
    

    The BSD Emulation Library is at level 2, and is likely to be removed in the next edition of this specification.



    Go to Next Chapter (Chapter 7)
    Go back to the Overview
    Back to the Table of Contents
    Back to the MIPS ABI Home Page


    Maintained by webmaster@mipsabi.org
    last modified on 96/01/22

    Copyright © 1995, MIPS ABI Group, Incorporated.